import request from '@/utils/request'
// 获取菜单列表
export const menusListAPI = () => {
  return request({
    method: 'get',
    url: '/menus'
  })
}
// 删除菜单列表
export const delMenusListAPI = (id) => {
  return request({
    method: 'delete',
    url: `/menus/${id}`
  })
}
// 获取菜单详情
export const menusDetailAPI = (id) => {
  return request({
    method: 'get',
    url: `/menus/${id}`
  })
}
// 菜单修改
export const emitMenusListAPI = (menusform) => {
  return request({
    method: 'put',
    url: `/menus/${menusform.id}`,
    data: menusform
  })
}

// 菜单添加

export const addMenus = (form) => {
  return request({
    method: 'post',
    url: '/menus',
    data: form
  })
}
